package com.zippoy.common.authorits.action;

import com.zippoy.common.authorits.beans.SysUser;
import com.zippoy.common.authorits.services.SysUserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/auths")
@Repository
public class AuthAction {
	@Autowired
	public SysUserService sysUserService;
	@RequestMapping("/add.action")
	public String add(String userName,String passWord) {
		if(userName!=null&&passWord!=null){
			SysUser user=new SysUser();
			user.setLoginName(userName);
			user.setPassWord(passWord);
			this.sysUserService.insert(user);
		}
		return "index";
	}
}
